package com.example.springbootmpdemo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.springbootmpdemo.entity.Member;
import com.example.springbootmpdemo.mapper.MemberMapper;
import com.example.springbootmpdemo.service.IMemberService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author metasequoia
 * @since 2021-12-19
 */
//实现IxxxService里的方法，要先在那里定义一个抽象方法
@Service
public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> implements IMemberService {
    @Override
    public List findMemberByName(String name) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("name",name);

        return list(wrapper);
    }
}
